-
Notifications
You must be signed in to change notification settings - Fork 568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os/board/rtl8730e: Update BSP driver irq priority running on cortex-A #6269
Conversation
edwakuwaku
commented
Jul 1, 2024
- Currently the driver priority setting is according to cortex-M value range (ie. NVIC), but rtl8730e is running on cortex-A, which has it's own value range for setting irq priority (ie. GIC).
- This PR revise the wrong usage on irq priority for peripheral drivers
- Due to performance issue, Increase irq priority level for LCDC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about other places in code where we are using the old system?
For example amebasmart_serial.c, etc..
@@ -89,7 +89,7 @@ static u8 lcdc_nextframe = 0; | |||
struct irq lcdc_irq_info = { | |||
.num = LCDC_IRQ, | |||
.data = (u32) LCDC, | |||
.priority = INT_PRI_MIDDLE, | |||
.priority = INT_PRI_HIGH, | |||
}; | |||
|
|||
extern struct irq mipi_irq_info; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to increase the priority of mipi also? It is currently set to middle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MIPI irq is only used during sending init command table. When running LCD app, only LCD irq is being applied.
@@ -1312,7 +1312,7 @@ BOOL AUDIO_SP_LLPTXGDMA_Init( | |||
u32 pTxData = Lli[0].LliEle.Sarx; | |||
|
|||
/*obtain a DMA channel and register DMA interrupt handler*/ | |||
GdmaChnl = GDMA_ChnlAlloc(0, CallbackFunc, (u32)CallbackData, INT_PRI_MIDDLE); | |||
GdmaChnl = GDMA_ChnlAlloc(0, CallbackFunc, (u32)CallbackData, INT_PRI_HIGH); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we increasing the priority of dma irq? What effect will this have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used by I2S DMA, which is for audio TX (ie. Bixby app). I tried to increase this to see whether there is performance improvement..
Ya, that should be changed as well... Thank you for reminding |
- Currently the driver priority setting is according to cortex-M value range (ie. NVIC), but rtl8730e is running on cortex-A, which has it's own value range for setting irq priority (ie. GIC). - This PR revise the wrong usage on irq priority for peripheral drivers
- Due to performance issue, Increase irq priority level for LCDC and I2S DMA TX
we are getting same performance in both sample app and benchmark app with and without this pr Sample - 16ms (60fps) measured using rtc |
Hello @r0bindal , thanks for updating the results. |
- During SPI read operation, SPI TX sem wait is not triggered, but sem post is being done during TX done irq. Thus, a flag was added to determine whether the TX sem post is needed to be done
@edwakuwaku We've verified that this and PR #6271 resolves external flash hang. I am going to merge if possible. Is there any reason to mark |
In the second commit of this PR, I would like to check whether it works better if we increase the irq priority for driver used by bixby audio and LCD. But it seems it was not tested together yet. |